package com.spirng.leetcode.day06;

import java.util.ArrayList;

public class Test559 {
    public int maxDepth(Node root) {
        int dept=0;
        ArrayList<Integer> list = new ArrayList<>();
        if(root==null){
           return 0;
       }
        for (Node child : root.children) {
            dept=Math.max(dept,maxDepth(child));
        }
        return dept+1;
    }
}
